home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / sviluppo / svilupp2 / hw2sgf39.rdm < prev    next >
Text File  |  1997-01-18  |  4KB  |  99 lines

  1. Short:    Rel5: Sample Sources How to Use V39/V40 graphics.library
  2. Author:   jschober@campusart.com (Jürgen Schober)
  3. Uploader: jschober@campusart.com (Jürgen Schober)
  4. Type:     dev/src
  5. Date:     96/12/04
  6. Replace:  How2UseGfxV39.lha How2UseGfxV39.readme How2UseGfx-P2.lha How2UseGfxV39-P2.readme
  7.  
  8. Now part 2 of the demo is also included into this archive and it is
  9. ~800KB in size :)
  10.  
  11. This archive includes some code that shows how you can
  12. use systemfriendly BitBlits. It shows how palette sharing is
  13. handled and how friendbitmaps can be used. 
  14. The main goal is to show that it is possible to support both
  15. native ECS/AGA and gfxboards with image blitting stuff and
  16. how you can check out what is the best way to blit images.
  17. The demo opens a window on the public screen (Workbench)
  18. allocates pens for a red, a green and a blue shaded ball.
  19. Also a background pen is allocated and the color is cycled throu
  20. a color table. The balls are moved around the window.
  21. It runs on any displaymode, independend if gfx board or not or
  22. what color depth you use (though I haven't tried 24 bit modes yet).
  23.  
  24. Within a talk to another programmer I found that there is some
  25. need on information on this topic. So I thought I should release
  26. such an archive. Feel free to do what ever you want with this archive
  27. (except selling it and making money:)
  28. As this example could also to be used to write board friendly games,
  29. it is dedicated to these people out there who are still thinking
  30. palette sharing etc. is useless...why can't I have white backgrounds
  31. on some text manipulation programs ?
  32.  
  33. New: Chunky Friend Allocation has been fixed (BMF_MINPLANES)
  34.  
  35.      30.11.96 Minor changes to the code (inner sizes are calculated right)
  36.  
  37. Please, also see the ReadMe included in this archive.
  38.  
  39. -----------------------------------------------------------------------------
  40.  
  41. Part 2 Readme:
  42.  
  43. I have now included the part 2 into this archive, also the Image is available
  44. in source code. I also fixed the rastport bug I had in part 2 before , 
  45. and also I forgot to free the background in the last release... 
  46. (what a shame, I know =:~/ )
  47.  
  48.  
  49. This archive contains some example material how scrolling
  50. bitmaps could be handled. It is just an example how things 
  51. could be done, because I am bretty sure, none of you will
  52. use ScollLayers() in a SuperBitmap window for a real application.
  53. But with a fast board (e.g. a PiccoloSD64) and a good driver
  54. (e.g. EGSPlus :) it shows what could be done if the Amiga
  55. would have the right chips.
  56. This demo opens a 320x256 window on any screen (currently a
  57. WB clone or the WB itself) with a 640x512 custom superbitmap
  58. attached to it. The backdrop is a 256 color image (640x512)
  59. which is scrolled thru the window. On top of it a green ball is
  60. jumping around. Both images where created in 24 bit and color
  61. reduced to 256 colors. The real colors are calculated on startup 
  62. using a shared palette. It looks best when run on a 256 color
  63. screen (but will reduce the colors if less). It should run on any
  64. board (ECS/AGA too) but isn't really useable on native amiga chips...
  65. I haven't tried CyberGraphics yet (but I should) but I think it
  66. would run more smoothly on EGS systems (with EGSPlus) since
  67. the SuperBitMap is held in boardmemory in this case which makes
  68. the scrolling much better :)
  69.  
  70. It does no buffer blitting yet (e.g. double buffer, refresh buffer or such).
  71. And it does not use an custom scrolling code, which would sure
  72. help for slow boards...(e.g. a delta frame scrolling would be a lot
  73. faster).
  74. But maybe you find some things what would be intuitiv for your ideas.
  75. So check it out ... and if you have a fast EGS board enjoy :)
  76.  
  77. PS.: I haven't either included the Backdground image nor the Image source
  78. since this have about 1.2 MB...the object code should be ok if
  79. you want to recompile it.
  80. The colortableformat is a modified Amiga Colortable format
  81. and looks like this:
  82.  
  83. struct Colors
  84. {
  85.     ULONG red,green,blue; // left justified 32 bits
  86. } colors[256];
  87.  
  88. all other things should be clear from the source code. You should be
  89. able to hook another image in ...
  90.  
  91.  
  92. ---
  93. Jürgen Schober
  94. Graz · Austria
  95. e-mail: point@sbox.tu-graz.ac.at (private)
  96.         jschober@campusart.com   (business)
  97. WWW:    http://www.sbox.tu-graz.ac.at/home/point/Welcome.html
  98.         http://www.pointdesign.campusart.com/
  99.